<table class="table table-hover">
    <tr>
        <td width="70px">
            <a href="{{ url_for('main.user', username=post.author.username) }}">
                <img src="{{ post.author.avatar(70) }}" />
            </a>
        </td>
        <td>
            {% set user_link %}
                <span class="user_popup">
                    <a href="{{ url_for('main.user', username=post.author.username) }}">
                        {{ post.author.username }}
                    </a>
                </span>
            {% endset %}
            {{ user_link }} 发表：{{moment(post.timestamp).fromNow() }}
            <a href="{{ url_for('main.post',id=post.id) }}">
                <small><span class = 'label label-default'>文章链接</span></small>
            </a>
            {% if current_user.id == post.user_id %}
                <a href="{{ url_for('main.edit_post',id=post.id) }}">
                    <small><span class = 'label label-default'>编辑</span></small>
                </a>  
            {% endif %}
            <br>
            {{ post.body }}
            
        </td>
    </tr>
</table>